Skip to content

Constants cleanup.#958

Merged
dereuromark merged 1 commit into5.xfrom
5.x-constants
Nov 22, 2025
Merged

Constants cleanup.#958
dereuromark merged 1 commit into5.xfrom
5.x-constants

Conversation

@dereuromark
Copy link
Copy Markdown
Member

@dereuromark dereuromark commented Nov 19, 2025

Resolves #948

Deprecated Constants (all marked with @deprecated 5.0.0):

  • All PHINX_TYPE_* constants now reference the new TYPE_* constants
  • PHINX_TYPES_GEOSPATIAL references the new array

Since they all have the same string value, this should be fully BC

These are deprecated MySQL-specific types that don't have new equivalents since they're being removed:

  • PHINX_TYPE_ENUM - deprecated in 5.0.0
  • PHINX_TYPE_SET - deprecated in 5.0.0
  • PHINX_TYPE_BLOB, PHINX_TYPE_TINYBLOB, PHINX_TYPE_MEDIUMBLOB, PHINX_TYPE_LONGBLOB - deprecated in 5.0.0
  • PHINX_TYPE_VARBINARY - deprecated in 5.0.0
  • PHINX_TYPE_JSONB - deprecated in 5.0.0

These remain using their old names because they're deprecated themselves and will be removed entirely in a future version (afaik?). At least they dont have a matching constant in the Cake Schema interface.

This finishes the phinx cleanup, since now you can start using the new ones, and in 6.x (for Cake 6) we can remove all deprecations for good. Enough time for people to upgrade.

My rational is:

  • Better starting now than having to deal with this in 6.x
  • Soft deprecation, so no rush to get things migrated (using rector script)
  • Cleaner code base and naming right away for everyone
  • Deprecated constants also more visible due to the old naming.

Rector automation PR: cakephp/upgrade#361

@dereuromark
Copy link
Copy Markdown
Member Author

dereuromark commented Nov 21, 2025

You merged the upgrade rectors @markstory
So I assume we can merge this then as well?

@dereuromark dereuromark merged commit cc5b6cc into 5.x Nov 22, 2025
13 checks passed
@dereuromark dereuromark deleted the 5.x-constants branch November 22, 2025 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant